package com.zp.security.jwt.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/usr")
public class UserController {


    @GetMapping("/add")
    public String add(){
        return "成功添加用户";
    }

    @DeleteMapping("/delete")
    public String delete(){
        return "用户删除成功";
    }

    @PutMapping("/update")
    @PreAuthorize("hasAnyAuthority('更新用户')")
    public String update(){
        return "用户更新成功";
    }

}
